Skip to content

test: isolate runtime state and PTY integration - #175

Draft
Lint111 wants to merge 2 commits into
Ark0N:masterfrom
Lint111:agent/split-quick-start-fixture
Draft

test: isolate runtime state and PTY integration#175
Lint111 wants to merge 2 commits into
Ark0N:masterfrom
Lint111:agent/split-quick-start-fixture

Conversation

@Lint111

@Lint111 Lint111 commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • Give the quick-start API suite its own temporary HOME.
  • Install a suite-wide temporary HOME / USERPROFILE and explicit VITEST
    marker before application imports can resolve runtime paths.
  • Preserve the platform Playwright browser cache while isolating all Codeman
    state, then restore the caller environment and remove only the temporary
    fixture directory during teardown.
  • Attach a deterministic live echo PTY during Vitest runs and skip real
    tmux/agent geometry calls, so integration tests exercise input/output without
    creating or controlling host sessions.

Root cause

The test harness did not reliably identify itself as a test environment and
allowed module-level paths to resolve from the developer's real home directory.
The quick-start suite could therefore clean up the real
~/codeman-cases/testcase directory, including the checkout running Vitest.
Session integration tests could also launch real tmux/agent processes.

Scope

This is the test-infrastructure slice extracted from #173. It changes the
quick-start fixture, global test setup, and a VITEST-guarded session adapter.
Normal application execution is unchanged.

Validation

  • npm run test:ci -- test/quick-start.test.ts test/integration-flows.test.ts:
    2 files, 23 tests passed
  • Working tree and git diff --check: clean

@Lint111 Lint111 changed the title test: isolate quick-start case fixtures test: isolate runtime state and PTY integration Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant